# -*- coding： UTF-8 -*-
import codecs

def saveFileContent(filePath,content):
    f = codecs.open(filePath,"w","utf8")
    if type(content) is str:
        f.write(content)
    elif type(content) is list:
        i = 1
        for problem in content:
            f.write(str(i)+"."+problem.getStringExpression()+" = \r\n")
            i = i + 1
    else:
        print("Error: Illegal type for function saveFileContent(filePath,content)")
    f.close()